use crate::{
    bootstrap::AppState,
    controller::webauthn::{
        finish_authentication, finish_register, start_authentication, start_register,
    },
};
use axum::{Router, routing::post};

pub fn router() -> Router<AppState> {
    let router = Router::new()
        .route("/register_start/{username}", post(start_register))
        .route("/register_finish", post(finish_register))
        .route("/login_start/{username}", post(start_authentication))
        .route("/login_finish", post(finish_authentication));

    router
}
